package com.yimoo.elearning.vo;

/**
 * UserhistoryId entity. @author MyEclipse Persistence Tools
 */

public class UserhistoryId implements java.io.Serializable {

	// Fields

	private Userinfo userinfo;
	private Groupinfo groupinfo;

	// Constructors

	/** default constructor */
	public UserhistoryId() {
	}

	/** full constructor */
	public UserhistoryId(Userinfo userinfo, Groupinfo groupinfo) {
		this.userinfo = userinfo;
		this.groupinfo = groupinfo;
	}

	// Property accessors

	public Userinfo getUserinfo() {
		return this.userinfo;
	}

	public void setUserinfo(Userinfo userinfo) {
		this.userinfo = userinfo;
	}

	public Groupinfo getGroupinfo() {
		return this.groupinfo;
	}

	public void setGroupinfo(Groupinfo groupinfo) {
		this.groupinfo = groupinfo;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof UserhistoryId))
			return false;
		UserhistoryId castOther = (UserhistoryId) other;

		return ((this.getUserinfo() == castOther.getUserinfo()) || (this.getUserinfo() != null
				&& castOther.getUserinfo() != null && this.getUserinfo().equals(castOther.getUserinfo())))
				&& ((this.getGroupinfo() == castOther.getGroupinfo()) || (this.getGroupinfo() != null
						&& castOther.getGroupinfo() != null && this.getGroupinfo().equals(castOther.getGroupinfo())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getUserinfo() == null ? 0 : this.getUserinfo().hashCode());
		result = 37 * result + (getGroupinfo() == null ? 0 : this.getGroupinfo().hashCode());
		return result;
	}

}